package com.FSS.FileList;

import com.FSS.File.IFile;
import com.FSS.config.Config;

public class ChildBox extends IBox {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4234536542763536325L;

	@Override
	public void rar() {
		String files = " ";
		for (IFile file : this) {
			files += Config.DOC_LOCATION + file.getName() + " ";
		}
		try {
			Runtime rt = Runtime.getRuntime();
			Process p = rt.exec(Config.rarCmd + Config.rarDist + this.boxName
					+ ".rar" + files);
			this.streamHandle(p);
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}

}
